      Module ElementStiffness_Expansivity_Module
    
      Implicit None
      
      Contains
    
      Attributes(Device) Subroutine ElementStiffness_Expansivity_GPU(Shapt,Knodt,Dvolu,Estif,Nevab,Shapf,Knodf,Iloca,Jloca,Dvolv,Estig)

!.... Form The J-Matrix

      Implicit None
!.... Input Variables:
      Double Precision Shapt
      Double Precision Dvolu
      Double Precision Shapf
      Double Precision Dvolv
      Integer Knodt
      Integer Nevab
      Integer Knodf
      Integer Iloca
      Integer Jloca
      Dimension Shapt(Knodt),Shapf(Knodf)
!.... Output Variables:
      Double Precision Estif(Nevab,Nevab),Estig(Nevab,Nevab)
!.... Local Variables
      Integer Igash
      Integer Jgash
      Integer Inode
      Integer Jnode
      Double Precision Cons1,Cond1
      Double Precision Cons2,Cond2
      
      Jgash=Iloca
      Do Jnode=1,Knodf
         Jgash=Jgash+1
         Cond1=Shapf(Jnode)*Dvolu
         Cond2=Shapf(Jnode)*Dvolv
         Igash=Jloca
         Do Inode=1,Knodt
            Igash=Igash+1
            Cons1=Shapt(Inode)*Cond1
            Cons2=Shapt(Inode)*Cond2
!.... J-Matrix
            Estif(Jgash,Igash)=Estif(Jgash,Igash)+Cons1
!.... Jt-Matrix
            Estig(Igash,Jgash)=Estig(Igash,Jgash)+Cons2
         End Do
      End Do
      
      Return
      End
    
      End Module